package com.hunan.chinamobile.dao;

import com.hunan.chinamobile.core.MyMapper;
import com.hunan.chinamobile.dto.ExceptionCount;
import com.hunan.chinamobile.dto.ExceptionDTO;
import com.hunan.chinamobile.model.Exceptions;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExceptionsMapper extends MyMapper<Exceptions> {

    List<ExceptionDTO> findList(@Param("cityId") String cityId,@Param("bsId") String bsId,@Param("type") Integer type,@Param("state") Integer state);

    Exceptions findByCondition(@Param("deviceId") String deviceId,@Param("type") Integer type,@Param("state") Integer state);

    List<ExceptionDTO> findByQuery(@Param("startTimeStr") String startTimeStr,@Param("endTimeStr") String endTimeStr);

    List<ExceptionDTO> findByNotQuery(@Param("dns") String dns,@Param("startTimeStr") String startTimeStr);

    int countByCurrYear(@Param("cityId") String cityId);

    ExceptionCount countByCurrMonth(@Param("cityId") String cityId);

    ExceptionCount countByUntreated(@Param("cityId") String cityId);
}